package com.goodluck.goodluckim.db.model;

import com.goodluck.goodluckim.utils.GsonUtil;

import java.util.Map;

/**
 * Created by wyj on 2018/9/13.
 */

public class CSMessage {
    private Long id;
    /**
     * 消息id
     */
    private long messageId;
    /**
     * 是发送者还是接收者
     */
    private int messageDirection;
    /**
     * 发送者ID
     */
    private long senderUserId;
    /**
     * 接收时间
     */
    private long receivedTime;
    /**
     * 接收状态  isRead isDownload isRetrieved isMultipleReceive
     */
    private int receivedStatus;
    /**
     * 发送时间
     */
    private long sendTime;
    /**
     * 发送状态     SENDING,FAILED, SENT, RECEIVED,READ, DESTROYED,CANCELED
     */
    private int sendStatus;
    /**
     * 名称
     */
    private String objectName;
    /**
     * 消息体
     */
    private String messageContent;
    /**
     * 未读数
     */
    private int isUnread;
    /**
     * 置顶 （插入时间，按时间排序）
     */
    private long stickTime;
    /**
     * 接收者ID
     */
    private long receiveId;
    /**
     * 会话类型
     */
    private int sessionType;
    /**
     * 消息类型
     */
    private int messageType;
    /**
     * 消息来源（个聊是发送者ID、群聊是群ID、其他消息如消息通告可在后台配置固定ID）
     */
    private long sessionID;
    /**
     * 附件信息JSON串(语言、视频、定位等信息)
     */
    private String msgAttachment;
    /**
     * 附件状态	def（默认状态，未开始），fail（传输失败），transferred（传输成功），transferring（正在传输）
     */
    private int attachStatus;
    /**
     * @名称
     */
    private String callUser;
    /**
     * @userid集合
     */
    private String callUserIds;
    /**
     * 附加
     */
    private Map<String, String> extra;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getMessageId() {
        return messageId;
    }

    public void setMessageId(long messageId) {
        this.messageId = messageId;
    }

    public int getMessageDirection() {
        return messageDirection;
    }

    public void setMessageDirection(int messageDirection) {
        this.messageDirection = messageDirection;
    }

    public long getSenderUserId() {
        return senderUserId;
    }

    public void setSenderUserId(long senderUserId) {
        this.senderUserId = senderUserId;
    }

    public long getReceivedTime() {
        return receivedTime;
    }

    public void setReceivedTime(long receivedTime) {
        this.receivedTime = receivedTime;
    }

    public int getReceivedStatus() {
        return receivedStatus;
    }

    public void setReceivedStatus(int receivedStatus) {
        this.receivedStatus = receivedStatus;
    }

    public long getSendTime() {
        return sendTime;
    }

    public void setSendTime(long sendTime) {
        this.sendTime = sendTime;
    }

    public int getSendStatus() {
        return sendStatus;
    }

    public void setSendStatus(int sendStatus) {
        this.sendStatus = sendStatus;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public int getIsUnread() {
        return isUnread;
    }

    public void setIsUnread(int isUnread) {
        this.isUnread = isUnread;
    }

    public long getStickTime() {
        return stickTime;
    }

    public void setStickTime(long stickTime) {
        this.stickTime = stickTime;
    }

    public long getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(long receiveId) {
        this.receiveId = receiveId;
    }

    public int getSessionType() {
        return sessionType;
    }

    public void setSessionType(int sessionType) {
        this.sessionType = sessionType;
    }

    public int getMessageType() {
        return messageType;
    }

    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public long getSessionID() {
        return sessionID;
    }

    public void setSessionID(long sessionID) {
        this.sessionID = sessionID;
    }

    public String getMsgAttachment() {
        return msgAttachment;
    }

    public void setMsgAttachment(String msgAttachment) {
        this.msgAttachment = msgAttachment;
    }

    public int getAttachStatus() {
        return attachStatus;
    }

    public void setAttachStatus(int attachStatus) {
        this.attachStatus = attachStatus;
    }

    public String getCallUser() {
        return callUser;
    }

    public void setCallUser(String callUser) {
        this.callUser = callUser;
    }

    public String getCallUserIds() {
        return callUserIds;
    }

    public void setCallUserIds(String callUserIds) {
        this.callUserIds = callUserIds;
    }

    public String getExtra() {
        return GsonUtil.getInstance().toJson(extra);
    }

    public void setExtra(Map<String, String> extra) {
        this.extra = extra;
    }
}
